Skip to content

Improve backporting prompt#509

Merged
TomasKorbar merged 1 commit into
packit:mainfrom
opohorel:prompt_improvement
May 21, 2026
Merged

Improve backporting prompt#509
TomasKorbar merged 1 commit into
packit:mainfrom
opohorel:prompt_improvement

Conversation

@opohorel

Copy link
Copy Markdown
Collaborator

Be stricter about NOT backporting changelogs

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.
  • Update or write new documentation in packit/packit.dev.
  • ‹fill in›

Fixes

Related to

Merge before/after

RELEASE NOTES BEGIN

Packit now supports automatic ordering of ☕ after all checks pass.

RELEASE NOTES END

Be stricter about NOT backporting changelogs

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the backport skill documentation and agent prompts to enhance build error tracking and refine file filtering logic. Key changes include the introduction of a process for archiving build logs and documenting fix attempts in a dedicated fix-attempts.md file to prevent redundant troubleshooting strategies. Additionally, the instructions were updated to mandate dropping all changes to non-core files (such as CI workflows, gitignore, and changelogs) regardless of whether they conflict. A review comment identifies a potential indexing inconsistency between the documentation and the implementation regarding the incremental_fix_attempts counter, which could lead to incorrect log archiving behavior.

6. If the fix **fails** → update `build_error` with the new error, go back to Step 5a.
3. Archive build logs and record the error:
a. Create `<local_clone>-upstream/build-logs/` directory if it doesn't exist.
b. If `incremental_fix_attempts > 1`, move all `.log` and `.log.gz` files from `<local_clone>` to `<local_clone>-upstream/build-logs/attempt-<previous_attempt>/`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The instruction If incremental_fix_attempts > 1 appears to use 1-based indexing, whereas the code in ymir/agents/backport_agent.py uses 0-based indexing for state.incremental_fix_attempts. This discrepancy may lead to confusion or incorrect behavior. Please ensure the documentation and code are consistent.

@TomasTomecek TomasTomecek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@TomasKorbar TomasKorbar merged commit a65890d into packit:main May 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants